import { Table } from 'antd'
export default function Testtable() {
  const dataSource = [
    {
      key: '1',
      name: '胡彦斌',
      age: 32,
      address: '西湖区湖底公园1号',
    },
    {
      key: '2',
      name: '胡彦祖',
      age: 42,
      address: '西湖区湖底公园1号',
    },
  ]

  const columns = [
    {
      title: '姓名',
      dataIndex: 'name',
      key: 'name',
      render: (cover) => {
        return <h1 onClick={(cover) => clickHandle(cover)}>{cover}</h1>
      },
    },
    {
      title: '年龄',
      dataIndex: 'age',
      key: 'age',
    },
    {
      title: '住址',
      dataIndex: 'address',
      key: 'address',
    },
  ]
  const clickHandle = (cover) => {
    console.log('2111111111', cover)
  }
  return (
    <div>
      <Table dataSource={dataSource} columns={columns} />;
    </div>
  )
}
